package com.qf.service.impl;

import com.qf.dao.ChargeDetailMapper;
import com.qf.dao.ChargeItemsMapper;
import com.qf.dao.CommunityMapper;
import com.qf.dao.ItemsMapper;
import com.qf.pojo.*;
import com.qf.service.ChargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChargeServiceImpl implements ChargeService {
    @Autowired
    private ChargeItemsMapper chargeItemsMapper;
    @Autowired
    private ItemsMapper itemsMapper;
    @Autowired
    private CommunityMapper communityMapper;


    @Override
    public List<ChargeItems> findAllChargeItems() {
        return chargeItemsMapper.selectByExample(null);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return chargeItemsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(ChargeItems chargeItems) {
        return chargeItemsMapper.updateByPrimaryKey(chargeItems);
    }

    @Override
    public int insert(ChargeItems chargeItems) {
        return chargeItemsMapper.insert(chargeItems);
    }

    @Override
    public ChargeItems selectByPrimaryKey(Integer id) {
        return chargeItemsMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Items> findAllItems() {
        return itemsMapper.selectByExample(null);
    }

    @Override
    public List<Community> findAllCommunity() {
        return communityMapper.selectByExample(null);
    }


}
